package cug.example.learningdao.Entity;


import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * @BelongsProject: hexy-job-modules
 * @BelongsPackage: cug.example.learningdao.Entity
 * @Author: halu
 * @CreateTime: 2025-10-16 14:07
 * @Description: TODO
 * @Version: 1.0
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("user")
public class User {

    /**
     * 主键
     */
    private Long id;

    /**
     * 姓名
     */
    @TableField(value = "name", condition = SqlCondition.LIKE)
    private String name;

    /**
     * 年龄
     */
    @TableField(condition = "%s&lt;#{%s}")
    private Integer age;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 直属上级id
     */
    private Long managerId;

    /**
     * 创建时间
     */
    private Date createTime;

    /*
     * 备注（不与数据库字段对应） # transient 不参与序列化
     */
    @TableField(exist = false)
    private String remark;

}
